//
//  HeadView.m
//  project_delicious
//
//  Created by dlios on 15-3-26.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "HeadView.h"

@implementation HeadView
- (instancetype)initWithFrame:(CGRect)frame
{
    
    
    self = [super initWithFrame:frame];
    if (self) {
        self.myImageView = [[UIImageView alloc] init];
        [self addSubview:self.myImageView];
        [_myImageView release];
        self.label = [[UILabel alloc] init];
        [self addSubview:self.label];
        [_label release];
  
        self.userInteractionEnabled = YES;
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat widths = self.frame.size.width;
    CGFloat heights = self.frame.size.height;
    self.myImageView.frame = CGRectMake(0, 0, widths / 8, heights);
    self.label.frame = CGRectMake(widths / 8 + 10, 0, widths / 2, heights);
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
